<template>
  <view class="page">
    <slot />
  </view>
</template>

<script>
export default {
  onLaunch() {
    console.log('App Launch');
  },
  onShow() {
    console.log('App Show');
  },
  onHide() {
    console.log('App Hide');
  }
};
</script>

<style scoped>
/* 全局样式 */
.page {
  background-color: #f5f7fa;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333;
  font-size: 28rpx;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* 使文字和组件适应不同设备的字体 */
body {
  font-size: 16px;
}

/* 提升文字对比度 */
h1, h2, h3, h4, h5, h6 {
  color: #333;
}

/* 样式优化 */
slot {
  display: block;
  width: 100%;
  text-align: center;
}

/* 响应式布局：增加对手机屏幕的自适应 */
@media (max-width: 768px) {
  .page {
    font-size: 24rpx;
    padding: 10rpx;
  }
}

@media (max-width: 480px) {
  .page {
    font-size: 22rpx;
    padding: 8rpx;
  }
}
</style>
